<template>
	<span 
		class="iconfont" 
		:class="name" 
		:style="{color: themeColor, fontSize: `${size}rpx !important`}" 
		@tap="$emit('click')">
	</span>
</template>

<script>
export default {
	name: 'jIcon',
	props:{
		name: String,
		color: String,
		size:{
			type: String,
			default: "20"
		}
	},
	computed:{
		themeColor(){
			if(this.color){
				return this.color;
			}else{
				return this.$theme.primary;
			}
		}
	}
};
</script>